<template>
  <el-select v-bind="$attrs" v-model="params" @change="handleChange">
    <el-option v-for="item in $attrs.options" :key="item[valueName]" :label="item[labelName]" :value="item[valueName]">
    </el-option>
  </el-select>
</template>
<script>
import Mixin from "./mixin"
export default {
  name: "Input",
  mixins: [Mixin],
  data() {
    return {}
  },
  computed: {
    valueName() {
      return this.$attrs.valuesType ? this.$attrs.valuesType.value : 'value'
    },
    labelName() {
      return this.$attrs.valuesType ? this.$attrs.valuesType.label : 'label'
    }
  }
}
</script>
<style lang="scss"></style>
